package com.yaowk.system.api;

import com.yaowk.common.api.PageReq;
import com.yaowk.common.api.PageResp;
import com.yaowk.system.api.model.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient("system")
@RequestMapping("/system/user")
public interface UserApi {

    @GetMapping
    PageResp<User> findAll(User user, PageReq pageReq);

    @GetMapping("/{id}")
    User findOne(@PathVariable Long id);

    @PostMapping
    User save(User user);

    @DeleteMapping("/{id}")
    void delete(@PathVariable Long id);

}
